package com.hxd.otc.common.enums;


import com.hxd.otc.R;
import com.hxd.otc.utils.ResourceUtil;

/**
 * Created by lzy on 2018/6/21 0021.
 * description ${广告交易类型}
 */
public enum TradeType {
    SALE(1, "挂卖"), BUY(0, "挂买");

    private final int value;
    private final String desc;

    TradeType(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    public static TradeType getInstanceByValue(int value) {
        if (SALE.value == value)
            return SALE;
        else
            return BUY;

    }
}
